package com.vincent.template.dto.sys.user;

import com.vincent.template.commons.constanst.EnumType;
import com.vincent.template.commons.validation.constraints.MatchEnum;
import com.vincent.template.commons.validation.constraints.MatchYMD;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;

/**
 * @author Vincent Wang
 * @date 2021/2/28 20:37
 */
@ApiModel(value = "UserUpdateDto", description = "用户信息更新")
public class UserUpdateDto {

    @ApiModelProperty(value = "手机号")
    @Length(max = 20)
    private String phone;

    @ApiModelProperty(value = "邮箱")
    @Email
    private String email;

    @ApiModelProperty(value = "生日")
    @MatchYMD
    private String birthday;

    @ApiModelProperty(value = "性别")
    @MatchEnum(type = EnumType.SEX_TYPE)
    private String sex;

    @ApiModelProperty(value = "地址")
    @Length(max = 128)
    private String address;

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
